import com.archegos.pojo.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Mytest {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("beans3.xml");
        //此处必须是UserService 因为他代理的是一个接口 不能是一个实现类
        UserService userService = (UserService) context.getBean("userservice");
        userService.add();
    }
}


